#include "TestResultStdErr.h"
#include "Failure.h"
#include <iostream>

using namespace std;

void TestResultStdErr::addFailure (const Failure & failure) 
{
    TestResult::addFailure(failure);
    cout << failure << endl;
}

void TestResultStdErr::endTests () 
{
    TestResult::endTests();
    std::cerr << testCount << " tests run" << endl;
    if (failureCount > 0){
        cout << "****** There were " << failureCount << " failures.";
    }
    else{
        cout << "There were no test failures.";
    }
    cout << "(time: " << secondsElapsed << " s)" << endl;
}

